
<?php 

// print_r($users);

?>

	<ul class="breadcrumb">
		<li><a href="<?php echo $this->webroot;?>">Home</a> <span class="divider">/</span></li>
		<li class="active"><?php echo __("Lista Utente") ?></li>
	</ul>


              <table class="table table-condensed table-bordered table-hover table-striped">
                <thead>
                  <tr>
				        <th></th>
				        <th><?php echo __("Utente") ?></th>
				        <th><?php echo __("Anagrafica") ?></th>
				        <th><?php echo __("Scadenza") ?></th>
				        <th><?php echo __("Ultimo Accesso") ?></th>
				        <th><?php echo __("Registrazione") ?></th>
				        <th><?php echo __("Gruppo") ?></th>
				        <th><?php echo __("Stato") ?></th>
				        <th></th>
                  </tr>
                </thead>
                <tbody>
					<?php foreach ($users as $user): ?> 
					<tr>
						<td><?php echo $this->Acl->link("<i class='icon-pencil'></i>",array("controller" => "Users", 'action' => 'edit', $user['User']['id']), array('escape'=>false));  ?></td>
						<td><label class='<?php if ($user["User"]["stato"]=="C") echo "deleted"; ?>'><?php echo $user['User']['username']; ?></label></td>
						<td><?php echo $user['Anagrafica']['nome']." ".$user['Anagrafica']['cognome']; ?></td>
						<td><?php echo $user['User']['dt_scadenza']; ?></td> 
						<td><?php echo $user['User']['dt_accesso']; ?></td> 
						<td><?php echo $user['User']['registrazione']; ?></td> 
						<td><?php echo $user['Group']['descrizione']; ?></td> 
						<td><?php echo $user['User']['stato_descr']; ?></td> 
						<td><?php echo $this->Acl->link("<i class='icon-trash'></i>",array("controller" => "Users", 'action' => 'delete', $user['User']['id']), array('data-confirm'=>'true', 'escape'=>false));  ?></td>
					</tr>
					<?php endforeach; ?>
					<?php unset($users); ?> 
					<tr>
						<td ><?php echo $this->Acl->link("<i class='icon-plus'></i>", "/Users/add", array('escape'=>false));  ?></td>
					</tr>					
                </tbody>
              </table>

